using System;
using JGSY.CMS.LowCode.Platform.Domain.Interfaces;

namespace Domain.Entities
{
    /// <summary>
    /// 插件实体
    /// 用于管理系统中的扩展插件
    /// </summary>
    public class Plugin : ITenantEntity
    {
        /// <summary>
        /// 插件标识符
        /// </summary>
        public long Id { get; set; }
        
        /// <summary>
        /// 插件名称
        /// 插件的显示名称
        /// </summary>
        public string Name { get; set; } = string.Empty;
        
        /// <summary>
        /// 插件版本
        /// 当前安装的插件版本号
        /// </summary>
        public string Version { get; set; } = string.Empty;
        
        /// <summary>
        /// 插件状态
        /// 0-禁用, 1-启用, 2-待更新
        /// </summary>
        public byte Status { get; set; }
        
        /// <summary>
        /// 插件配置
        /// 以JSON格式存储的插件配置参数
        /// </summary>
        public string Config { get; set; } = string.Empty;
        
        /// <summary>
        /// 安装时间
        /// 插件的安装时间戳
        /// </summary>
        public DateTime CreatedAt { get; set; }
        
        /// <summary>
        /// 租户标识符
        /// </summary>
        public string TenantId { get; set; } = string.Empty;
    }
}
